import React, { Component } from 'react';
import {
    Text, Image, View, ToastAndroid, PixelRatio, ScrollView, TouchableOpacity,AppRegistry
} from 'react-native';
import TestFunctionUtils from '../util/TestFunctionUtils';

import Head from './layout/Head';
import styles from '../../assets/css/style.js';
import Glob from '../util/Global';
const rem = Glob.WIDTH/7.5;


/**
 * 测试功能
 */
export default class Presentation extends Component {
    constructor(props) {
        super(props);
        this.state = {

        };
    }
    render(){
        const lists=[["首 页","icon_in"],["分 享","icon_fx"],["测试功能","icon_cs"],["状态查看","icon_ck"],["设 置","icon_sz"]];
        return (
            <View style={[styles.flex,styles.bgcolor]}>
                <Head title="测试报告" list={lists}> </Head>
                <View style={styles.flex}>
                    <ScrollView style={styles.ztScroll}>
                        <View style={styles.Ptwrap}>
                            <TouchableOpacity activeOpacity={1}  onPress={() => ToastAndroid.show('一键诊断功能', ToastAndroid.SHORT)}>
                                <View style={styles.PtIconWrap}>
                                    <Image
                                        style={styles.PtIcon_gif}
                                        resizeMode="contain"
                                        source={require('../../assets/img/icon_pt.png')}
                                    />
                                    <Text style={styles.Pticon_font}>68分</Text>
                                </View>
                            </TouchableOpacity>
                            <View style={styles.Pt_text}>
                                <View style={[styles.Pt_list]}>
                                    <View style={[styles.Pt_listmin]}>
                                        <Text style={styles.Pt_font}>协商速率：</Text>
                                        <Text style={styles.Pt_font}>50Mbps</Text>
                                    </View>
                                    <View style={[styles.Pt_listmin,styles.PtMaleft]}>
                                        <Text style={styles.Pt_font}>安全等级：</Text>
                                        <Text style={styles.Pt_font}>50Mbps</Text>
                                    </View>
                                </View>
                                <View style={[styles.Pt_list]}>
                                    <View style={[styles.Pt_listmin]}>
                                        <Text style={styles.Pt_font}>速率达标：</Text>
                                        <Text style={styles.Pt_font}>50Mbps</Text>
                                    </View>
                                    <View style={[styles.Pt_listmin,styles.PtMaleft]}>
                                        <Text style={styles.Pt_font}>IP端口：</Text>
                                        <Text style={styles.Pt_font}>50Mbps</Text>
                                    </View>
                                </View>
                                <View style={[styles.Pt_list]}>
                                    <View style={[styles.Pt_listmin]}>
                                        <Text style={styles.Pt_font}>信号强度：</Text>
                                        <Text style={styles.Pt_font}>50Mbps</Text>
                                    </View>
                                    <View style={[styles.Pt_listmin,styles.PtMaleft]}>
                                        <Text style={styles.Pt_font}>周边干扰：</Text>
                                        <Text style={styles.Pt_font}>50Mbps</Text>
                                    </View>
                                </View>

                            </View>
                        </View>
                        <View style={styles.ztListAll}>
                            <View style={styles.ztList_01}>
                                <Image
                                    style={styles.ztList_img}
                                    resizeMode="contain"
                                    source={require('../../assets/img/icon_xg.png')}
                                />
                                <Text style={styles.ztList_font}>WIFI测试效果图</Text>
                            </View>
                            <View style={styles.ztList_02}>
                                <Text style={[styles.ztList_font02,styles.ztList_font03]}>详细信息</Text>
                                <Image
                                    style={styles.ztList_ri}
                                    resizeMode="contain"
                                    source={require('../../assets/img/icon_ri.png')}
                                />
                            </View>
                        </View>
                        <View style={styles.ztListAll}>
                            <View style={styles.ztList_01}>
                                <Image
                                    style={styles.ztList_img}
                                    resizeMode="contain"
                                    source={require('../../assets/img/icon_yh.png')}
                                />
                                <Text style={styles.ztList_font}>
                                    <Text style={[styles.ztList_font04,styles.PtMarRight]}>1 </Text>
                                    <Text>项优化建议</Text>
                                </Text>
                            </View>
                            <View style={styles.ztList_02}>
                                <Text style={[styles.ztList_font02,styles.ztList_font04]}><Text>问题：</Text>下载速度过于缓慢</Text>
                            </View>
                            <View style={styles.ztList_02}>
                                <Text style={[styles.ztList_font02]}><Text>建议：</Text>关闭后台过多的运行程序</Text>
                            </View>
                        </View>
                    </ScrollView>
                </View>

                <View title="点击查看效果图" style={[styles.CesProcess,styles.center,styles.PtWhite,{display:"none"}]}>
                    <View style={[styles.Ipwrap]}>
                        <Image
                            style={styles.Ip_Bgimg}
                            resizeMode="contain"
                            source={require('../../assets/img/bg_sp.png')}
                        />
                    </View>
                </View>

                <View title="点击分享弹出层" style={[styles.CesProcess,styles.center,{display:"none"}]}>
                    <View style={styles.PtShare}>
                        <View style={styles.PSList}>
                            <Image
                                style={styles.PSL_img}
                                resizeMode="contain"
                                source={require('../../assets/img/ps_iconYJ.png')}
                            />
                            <Text style={styles.PSFont}>发送电子邮件</Text>
                        </View>
                        <View style={styles.PSList}>
                            <Image
                                style={styles.PSL_img}
                                resizeMode="contain"
                                source={require('../../assets/img/ps_iconQQ.png')}
                            />
                            <Text style={styles.PSFont}>发送给好友</Text>
                        </View>
                        <View style={styles.PSList}>
                            <Image
                                style={styles.PSL_img}
                                resizeMode="contain"
                                source={require('../../assets/img/ps_iconWX.png')}
                            />
                            <Text style={styles.PSFont}>微信好友</Text>
                        </View>
                        <View style={styles.PSList}>
                            <Image
                                style={styles.PSL_img}
                                resizeMode="contain"
                                source={require('../../assets/img/ps_iconQZ.png')}
                            />
                            <Text style={styles.PSFont}>朋友圈</Text>
                        </View>
                        <View style={styles.PSList}>
                            <Image
                                style={styles.PSL_img}
                                resizeMode="contain"
                                source={require('../../assets/img/ps_iconQQ.png')}
                            />
                            <Text style={styles.PSFont}>发送到我的电脑</Text>
                        </View>
                        <View style={styles.PSList}>
                            <Image
                                style={styles.PSL_img}
                                resizeMode="contain"
                                source={require('../../assets/img/ps_iconZF.png')}
                            />
                            <Text style={styles.PSFont}>发送到支付宝</Text>
                        </View>
                    </View>
                </View>
            </View>
        )


    }
}

AppRegistry.registerComponent('iHGuapp', () => Presentation);